/*fn gen_abort_reason_exception(reason: &ssa::AbortReason) -> String {
    match reason {
        ssa::AbortReason::BufMissized(exp) => {
            format!("ValueError(\"invalid buffer size, expected {exp}\")")
        }
        ssa::AbortReason::Malformed => "ValueError(\"malformed underlying buffer\")".to_owned(),
        ssa::AbortReason::Oob => "ValueError(\"index out of range\")".to_owned(),
    }
}*/

/*
/// Emits supplementary checks for a type, usually a function argument.  Should
/// be used mostly for checking lists or bytearrays are the proper lengths.
fn emit_suppl_type_check(
    vr: &ssa::Arg,
    ty: &ValueType,
    gctx: &GenContext,
    buf: &mut CodeBuffer,
) -> Result<(), Error> {
    match ty {
        ValueType::ByteArray(exp_size) => {
            let vr_syn = gctx.gen_arg_expr(vr);
            buf.emit_fmt(format_args!("if len({vr_syn}) != {exp_size}:"));
            buf.push_indent();
            buf.emit_fmt(format_args!(
                "raise ValueError(\"incorrect length for {vr_syn}, expected {exp_size}\")"
            ));
            buf.pop_indent();
            buf.emit_space();
            Ok(())
        }

        _ => Ok(()),
    }
}
*/
